package com.qst.mapper;

import com.qst.action.question.QuestionQueryParam;
import com.qst.entity.PersonalityDimension;
import com.qst.entity.Question;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface QuestionMapper {
    
    
    List<Question> findAll();

    List<Question> findByParam(QuestionQueryParam param);

    Question findById(int id);

    List<PersonalityDimension> findDimensionByQuestion(Integer id);

    void insert(Question q);

    List<Integer> findDimension(int qid);

    void detachDimension(int qid);

    void attachDimension(@Param("qid") int qid, @Param("p") int p);

    int findCountByAssessment(int id);

    void update(Question q);

    boolean isUsed(int questionId);

    void delete(int questionId);
}
